//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    list: [],
  },
  onLoad() {
    this.onReachBottom()
  },
  onReachBottom() {
    let list = this.data.list
    for (let i = 0; i < 14; i++) {
      list.push({
        coverUrl: '../../images/' + (i + 1) + '.png',
        name: i % 2 == 0 ? '发士大发士大发大' : '发士大发士大发士大发士大发士大发士大发士大发士大发士大发士大发士大发士大',
        headImgUrl: '../../images/splash1.jpg',
        userName: 'fasdfa',
        isLike: false,
        support: i + 1,
      })
    }
    this.setData({
      list: list
    })
  },
  onPullDownRefresh() {
    this.setData({
      list: []
    })
    this.onReachBottom()
  }
})